home *** CD-ROM | disk | FTP | other *** search
- ;-------------------------fptmul routine begins--------------------------+
- ; from BLUEBOOK OF ASSEMBLY ROUTINES FOR IBM PC & XT.
- ; page : 85
- ;
- ; NAME FPTMUL
- ; ROUTINE FOR MULTPLICATION OF TEMPORARY FLOATING POINT NUMBER BY 10
- ;
- ; FUNCTION: This routine multiplies a temporary binary floating point
- ; number by 10. The result is not normalized.
- ;
- ; INPUT: Upon entry DS:DI points to a temporary binary floating point
- ; number.
- ;
- ; OUTPUT: Upon exit DS:DI points to a temporary binary floating
- ; point number. This number is not normalized.
- ;
- ; REGISTERS USED: AX, CX, DX and DI are modified. DI must point to
- ; the input.
- ;
- ; SEGMENTS REFERENCED: The data segment must contain the temporary
- ; floating point number.
- ;
- ; ROUTINES CALLED: None
- ; SPECIAL NOTES: This is a near procedure needed by FPIN.
- ;
- ; ROUTINE TO MULTIPLY TEMP FLOATING POINT NUMBER BY 10
- ;
- fptmul proc near
- ;
- mov cx,5 ; for a count of five
- mov dx,0 ; carry of zero
- ;
- fptmul1:
- push cx ; save count
- mov ax,dx ; previous carry
- xchg ax,[di] ; switch with 16-bit digit
- mov cx,10 ; multiplier of 10
- mul cx ; multiply
- add [di],ax ; add into carry in place
- add di,2 ; next 16-bit digit
- pop cx ; restore count
- loop fptmul1
- ;
- ret ; return
- ;
- fptmul endp
- ;-------------------------fptmul routine ends---------------------------+